from database import engine


def StaticsReport():
    connection = engine.raw_connection()
    cursor = connection.cursor()
    try:
        cursor.callproc("statics_bureau_mon_rep_sum")
        connection.commit()
        cursor.callproc("statics_bureau_week_rep_sum")
        connection.commit()
        cursor.callproc("statics_pending_pro_det")
        connection.commit()
        cursor.callproc("statics_pending_pro_rep")
        connection.commit()
        cursor.callproc("statics_pending_pro_stu_sta")
        connection.commit()
        cursor.callproc("statics_pending_pro_stu_type")
        connection.commit()
        cursor.callproc("statics_vendor_problem")
        connection.commit()
    finally:
        cursor.close()
        connection.close()


if __name__ == "__main__":
    StaticsReport()
